Method for decoding image and apparatus using same

ABSTRACT

A method or coding image information, according to the present invention, comprises the steps of: binarizing according to different techniques, index values of forward prediction, backward prediction, and bidirectional prediction, depending on whether the bidirectional prediction is applied when inter-predicting a current block; and entropy coding a binarized codeword, wherein whether to apply the bidirectional prediction when inter-predicting the current block can be determined on the basis of the size of the current block. As a result, provided are a method for binarizing an inter-prediction direction of a prediction unit having a specific size, and an apparatus using same.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.16/672,290, filed on Nov. 1, 2019, which is a continuation of U.S.application Ser. No. 16/055,622, filed on Aug. 6, 2018, now U.S. Pat.No. 10,469,862, which is a continuation of U.S. application Ser. No.15/707,794 filed on Sep. 18, 2017, now U.S. Pat. No. 10,045,039, whichis a continuation of U.S. application Ser. No. 15/464,611 filed on Mar.21, 2017, now U.S. Pat. No. 9,769,487, which is a continuation of U.S.application Ser. No. 14/359,634 filed May 21, 2014, now U.S. Pat. No.9,621,909, which is a U.S. National Phase Application of InternationalApplication PCT/KR2013/005858, filed on Jul. 2, 2013, which claims thebenefit of U.S. Provisional Application No. 61/666,936, filed on Jul. 2,2012, and U.S. Provisional Application No. 61/666,938, filed on Jul. 2,2012, the entire contents of the prior applications are herebyincorporated by reference.

TECHNICAL FIELD

The present invention relates to a method of coding image informationand an apparatus using the same, and more particularly, to a method andan apparatus for binarizing image information.

BACKGROUND ART

Recently, demands for high-resolution and high-quality images haveincreased in various fields of applications. As images have higherresolution and higher quality, the amount of information on the imagesalso increases.

With a growing amount of information, multi-functional devices andnetworks with various environments are introduced. Accordingly, the samecontent may be utilized with different levels of quality.

Specifically, as terminals are able to support diverse qualities ofvideos and various network environments are established, a video withgeneral quality is enabled in one environment while a higher-qualityvideo may be available in another environment.

For example, a user may enjoy video content purchased through a portableterminal on a large-screen display with higher resolution at home.

In recent years, as high definition (HD) broadcast services areavailable, a large number of users is getting used to high-resolutionand high-quality videos and service providers and service users also payattention to ultrahigh-definition (UHD) services having a resolutionfour times higher than HDTV.

Thus, there is a need to provide scalability to video quality, forexample, the image quality, resolution, size and frame rate of a video,based on high-efficiency encoding and decoding methods on ahigh-capacity video so as to offer varied qualities of video services indifferent environments for users' demands.

DISCLOSURE Technical Problem

An aspect of the present invention is to provide a method of binarizingan inter prediction direction of a prediction unit having a specificsize and an apparatus using the same.

Another aspect of the present invention is to provide a method ofbinarizing an inter prediction direction of a prediction unit employingunidirectional inter prediction and an apparatus using the same.

Still another aspect of the present invention is to provide a method ofbinarizing an inter-prediction direction in a differential manner basedon a number of inter prediction directions and an apparatus using thesame.

Technical Solution

An embodiment of the present invention provides a method of coding videoinformation, the method including binarizing index values of forwardprediction, backward prediction and bidirectional prediction todifferent manner based on whether bidirectional prediction is applied toa current block in inter prediction, and entropy-coding the binarizedcodewords, wherein whether bidirectional prediction is applied to thecurrent block in inter prediction is determined based on a size of thecurrent block.

When a coding unit including the current block has an 8×8 size and apartition mode of the current block is not a 2N×2N, bidirectionalprediction may not be applied to the current block.

When the current block has a sum of width and length of 12,bidirectional prediction may not be applied to the current block .

The current block may be a prediction block.

When bidirectional prediction is applied to the current block in interprediction, index values of forward prediction and backward predictionmay be allocated 2-bit codewords and an index value of bidirectionalprediction may be allocated a 1-bit codeword.

When bidirectional prediction is not applied to the current block ininter prediction, index values of forward prediction and backwardprediction may be allocated 1-bit codewords.

Another embodiment of the present invention provides an apparatus forcoding video information, the apparatus including an entropy encodingmodule to binarize index values of forward prediction, backwardprediction and bidirectional prediction to different manner based onwhether bidirectional prediction is applied to a current block in interprediction and to entropy-code the binarized codewords, wherein whetherbidirectional prediction is applied to the current block in interprediction is determined based on a size of the current block.

Advantageous Effects

An embodiment of the present invention provides a method of binarizingan inter prediction direction of a prediction unit having a specificsize and an apparatus using the same.

Another embodiment of the present invention provides a method ofbinarizing an inter prediction direction of a prediction unit employingunidirectional inter prediction and an apparatus using the same.

Still another embodiment of the present invention provides a method ofbinarizing an inter-prediction direction in a differential manner basedon a number of inter prediction directions and an apparatus using thesame.

Yet another embodiment of the present invention reduces codedinformation to improve compression rate of video information.

DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram schematically illustrating a video encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 2 is a block diagram schematically illustrating a video decodingapparatus according to an exemplary embodiment of the present invention.

FIG. 3 illustrates a form of a prediction unit (PU) included in a codingunit (CU) according to the present invention.

FIG. 4 schematically illustrates an entropy coding module according tothe present invention.

FIG. 5 illustrates partitioning an 8×8 CU according to the presentinvention.

FIG. 6 illustrates partitioning a 16×16 CU according to the presentinvention.

FIG. 7 is a flowchart illustrating a method of coding video informationaccording to an exemplary embodiment of the present invention.

MODE FOR INVENTION

The present invention may be changed and modified variously and beillustrated with reference to different exemplary embodiments, some ofwhich will be described in detail and shown in the drawings. However,these embodiments are not intended for limiting the invention. Theterminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting the technical ideaof the invention. As used herein, the singular forms “a,” “an” and “the”are intended to include the plural forms as well, unless the contextclearly indicates otherwise. It will be further understood that theterms “include” and/or “have,” when used in this specification, specifythe presence of stated features, integers, steps, operations, elements,components, and/or combinations thereof, but do not preclude thepresence or addition of one or more other features, integers, steps,operations, elements, components, and/or combinations thereof

Although elements illustrated in the drawings are independently shownfor convenience of description of different distinctive functions in avideo encoding apparatus/decoding apparatus, such a configuration doesnot indicate that each element is constructed by a separate hardwareconstituent or software constituent. That is, at least two elements maybe combined into a single element, or a single element may be dividedinto a plurality of elements to perform functions. It is to be notedthat embodiments in which some elements are integrated into one combinedelement and/or an element is divided into multiple separate elements areincluded in the scope of the present invention without departing fromthe essence of the present invention.

Hereinafter, exemplary embodiments of the invention will be described indetail with reference to the accompanying drawings. Like referencenumerals in the drawings refer to like elements throughout, andredundant descriptions of like elements will be omitted herein.

FIG. 1 is a block diagram schematically illustrating a video encodingapparatus according to an exemplary embodiment of the present invention.A video encoding/decoding method or apparatus may be realized byextension of a general video encoding/decoding method or apparatus thatdoes not provide scalability, and a scalable video encoding apparatusmay be based on the video encoding apparatus FIG. 1.

Referring to FIG. 1, the video encoding apparatus 100 includes a picturepartition module 105, a prediction module 110, a transform module 115, aquantization module 120, a rearrangement module 125, an entropy encodingmodule 130, a dequantization module 135, an inverse transform module140, a filter module145 and a memory 150.

The picture partition module 105 may divide an input picture into atleast one block as a processing unit. Here, the block as the processingunit may be a prediction unit (PU), a transform unit (TU) or a codingunit (CU).

Processing unit blocks divided by the picture partition module 105 mayhave a quadtree structure.

The prediction module 110 may include an inter prediction module toperform inter prediction and an intra prediction module to perform intraprediction, which will be described. The prediction module 110 generatesa prediction block by performing prediction on the processing unit ofthe picture from the partition module 105. The processing unit of thepicture in the prediction module 110 may be a CU, a TU or a PU.Furthermore, the prediction module 110 may determine whether predictionperformed on the processing unit is inter prediction or intraprediction, and may determine details (for example, a prediction mode)of each prediction method. Here, a processing unit on which predictionis performed may be different from a processing unit for which aprediction method and details on the prediction method are determined.For example, a prediction method and a prediction mode may be determinedfor each PU, while prediction may be performed for each TU.

In inter prediction, a prediction block may be generated by performingprediction based on information on at least one of previous and/orsubsequent pictures of a current picture. In intra prediction, aprediction block may be generated by performing prediction based oninformation on a pixel within the current picture.

A skip mode, a merge mode and motion vector prediction (MVP) may be usedas an inter prediction method. In inter prediction, a reference picturefor a PU may be selected, and a reference block corresponding to the PUmay be selected. The reference block may be selected as a unit of interpixel. Subsequently, a prediction block that has a minimum residualsignal with respect to the current PU and has a minimum-size motionvector is generated.

The prediction block may be generated as an integer sample unit or as apixel unit smaller than an integer pixel, such as a ½ pixel unit and a ¼pixel unit. Here, the motion vector may be represented in a unit smallerthan an integer pixel.

Information including an index of the reference pixel selected in interprediction, the motion vector (e.g., a motion vector predictor) and theresidual signal, is entropy-encoded and transferred to a decodingapparatus. In the skip mode, since the prediction block may be areconstructed block, the residual may not be generated, transformed,quantized and transferred.

In intra prediction, a prediction mode is determined by a PU, andprediction may be performed by a PU. Alternatively, a prediction modemay be determined by a PU, and intra prediction may be performed in aTU.

Intra prediction may include 33 directional prediction modes and two ormore non-directional modes. The non-directional modes may include a DCprediction mode and a planar mode.

In intra prediction, the prediction block may be generated afterapplying a filter to a reference sample. Here, whether to apply thefilter to the reference sample may be determined on an intra predictionmode and/or size of a current block.

A residual value (residual block or residual signal) between thegenerated prediction block and an original block is input to thetransform module 115. Also, information on a prediction mode and amotion vector used for prediction are encoded along with the residualvalue by the entropy encoding module 130 and transferred to the decodingapparatus.

The transform module 115 transforms the residual block by a TU andgenerates a transform coefficient.

A transform block is a rectangular block of samples to which the sametransformation is applied. The transform block may be a TU and have aquadtree structure.

The transform module 115 may perform transformation based on aprediction mode applied to the residual block and a size of the block.

For example, when intra prediction is applied to the residual block andthe block has a 4×4 residual array, the transform module 115 maytransform the residual block using discrete cosine transform (DCT).Otherwise, the transform module 115 may transform the residual blockusing discrete sine transform (DST).

The transform module 115 may generate a transform block of transformcoefficients by transformation.

The quantization module 120 may quantize residual values transformed bythe transform module 115, that is, the transform coefficients, togenerate quantized transform coefficients. The coefficients generated bythe quantization module 120 are provided to the dequantization module135 and the rearrangement module 125.

The rearrangement module 125 rearranges the quantized transformcoefficients provided by the quantization module 120. Rearranging thequantized transform coefficients may enhance encoding efficiency in theentropy encoding module 130.

The rearrangement module 125 may rearrange a two-dimensional (2D) blockof the quantized transform coefficients into a one-dimensional (1D)vector using coefficient scanning.

The entropy encoding module 130 may perform entropy coding on symbolsaccording to probability distribution based on the quantized transformcoefficients rearranged by the rearrangement module 125 or encodingparameter values derived in coding, thereby outputting a bitstream.Entropy encoding is a method of receiving symbols having differentvalues and representing the symbols as a decodable binary sequence orstring while removing statistical redundancy.

Here, a symbol means a syntax element as an encoding/decoding target, acoding parameter, a value of a residual signal, or the like. A codingparameter, which is a parameter necessary for encoding and decoding, mayinclude information encoded by the encoding apparatus and transferred tothe decoding apparatus, such as a syntax element, and informationderived during an encoding or decoding process. This is the codingparameter means information necessary for encoding and decoding apicture. The coding parameter may include, for example, values orstatistics of an intra/inter prediction mode, a movement/motion vector,a reference picture index, an encoding block pattern, presence andabsence of a residual signal, a transform coefficient, a quantizedtransform coefficient, a quantization parameter, a block size and blockpartitioning information. A residual signal may denote a differencebetween an original signal and a prediction signal, a signal obtained bytransforming the difference between the original signal and theprediction signal, or a signal obtained by transforming and quantizingthe difference between the original signal and the prediction signal.The residual signal may be referred to as a residual block in a blockunit.

When entropy encoding is applied, symbols are represented by allocatinga small number of bits to symbols having a high probability andallocating a large number of bits to symbols having a low probability,thereby reducing a size of bit strings for symbols to be encoded.Therefore, entropy encoding may enhance compression performance of videoencoding.

Encoding methods, such as exponential Golomb, context-adaptive variablelength coding (CAVLC) and context-adaptive binary arithmetic coding(CABAC), may be used for entropy encoding. For example, the entropyencoding module 130 may store a table used for performing entropyencoding, such as a variable length coding/code (VLC) table, and theentropy encoding module 130 may perform entropy encoding using thestored VLC table. In addition, the entropy encoding module 130 mayderive a binarization method for a target symbol and a probability modelfor a target symbol/bin and perform entropy encoding using the derivedbinarization method or probability model.

Here, binarization means representing values of symbols as a binsequence/string. A bin means each bin value (0 or 1) when a symbol isrepresented as a bin sequence/string through binarization.

A probability model means a predicted probability of a symbol/bin as anencoding/decoding target that may be derived through contextinformation/context model. Context information/context model isinformation for determining a probability of a symbol/bin as anencoding/decoding target.

In more detail, CABAC as an entropy encoding method transforms a symbolthat is not binarized into a bin by binarization, determines a contextmodel using encoding information on a neighboring block and a encodingtarget block or information on a symbol/bin encoded in a previous stage,and predicts a probability of a bin according to the determined contextmodel and performs arithmetic encoding of the bin, thereby generating abitstream. Here, CABAC may determine the context model, and then updatethe context model using information on an encoded symbol/bin for acontext model for a next symbol/bin.

Furthermore, the entropy coding module 130 may apply a change to areceived parameter set or syntax as necessary.

The dequantization module 135 dequantizes the values quantized by thequantization module 120, that is, the quantized transform coefficients,and the inverse transform module 140 inverse-transforms the valuesdequantized by the dequantization module 135.

The residual values generated through the dequantization module 135 andthe inverse transform module 140 are merged with the prediction blockpredicted by the prediction module 110, thereby generating areconstructed block.

FIG. 1 illustrates that a reconstructed block is generated by merging aresidual block with a prediction block through an adder. Here, the addermay be regarded as a separate module for generating a reconstructedblock (reconstructed block generation module).

The filter module 145 may apply a deblocking filter, an adaptive loopfilter (ALF), and a sample adaptive offset (SAO) to a reconstructedpicture.

The deblocking filter may remove block distortion generated onboundaries between blocks in the reconstructed picture. The ALF mayperform filtering based on a value obtained by comparing thereconstructed picture obtained by filtering blocks using the deblockingfilter with the original picture. The ALF may be employed only for highefficiency. The SAO compensates an offset difference between theresidual block to which the deblocking filter has been applied and theoriginal picture by a pixel unit, in which a band offset or an edgeoffset is used.

Meanwhile, the filter module 145 may not apply filtering to areconstructed block used in inter prediction.

The memory 150 may store the reconstructed block or picture obtained viathe filter module 145. The reconstructed block or picture stored in thememory 150 may be provided to the prediction module 110 performing interprediction.

FIG. 2 is a block diagram schematically illustrating a video decodingapparatus according to an exemplary embodiment of the present invention.As described above in

FIG. 1, a scalable video encoding/decoding method or apparatus may berealized by extension of a general video encoding/decoding method orapparatus that does not provide scalability, and a scalable videodecoding apparatus may be based on the video decoding apparatus FIG. 2.

Referring to FIG. 2, the video decoding apparatus 200 may include anentropy decoding module 210, a rearrangement module 215, andequantization module 220, an inverse transform module 225, a predictionmodule 230, a filter module 235, and a memory 240.

When a video bitstream is input from the video encoding apparatus, theinput bitstream may be decoded according to an inverse procedure bywhich the video encoding apparatus processes video information.

The entropy decoding module 210 performs entropy decoding on an inputbitstream according to probability distribution to generate symbolsincluding quantized coefficient type of symbols. Entropy decoding is amethod of receiving a binary sequence or string and generating eachsymbol. Entropy decoding is similar to entropy encoding described above.

For example, if the video encoding apparatus uses variable length coding(VLC), such as CAVLC, to perform entropy encoding, the entropy decodingmodule 210 may perform entropy decoding by implementing the same VLCtable as used in the encoding apparatus. Furthermore, if the videoencoding apparatus uses CABAC to perform entropy ending, the entropydecoding module 210 may also perform entropy decoding using CABAC.

In more detail, CABAC as an entropy decoding method may receive a bincorresponding to each syntax element in the bitstream, determines acontext model using information on a syntax element to be decoded anddecoding information on a neighboring block and a block to be decoded orinformation on a symbol/bin decoded in a previous stage, and predict aprobability of a bin according to the determined context model toperform arithmetic decoding of the bin, thereby generating a symbolcorresponding to a value of each syntax element. Here, CABAC maydetermine the context model, and then update the context model usinginformation on a decoded symbol/bin for a context model for a nextsymbol/bin.

When entropy decoding is applied, symbols are represented by allocatinga small number of bits to symbols having a high probability andallocating a large number of bits to symbols having a low probability,thereby reducing a size of bit strings for each symbol. Therefore,entropy decoding may enhance compression performance of video decoding.

Information for generating a prediction block, among pieces ofinformation decoded by the entropy decoding module 210, may be providedto the prediction module 230. Residual values entropy-decoded by theentropy decoding module 210, that is, quantized transform coefficients,may be input to the rearrangement module 215.

The rearrangement module 215 may rearrange information on the bitstreamentropy-decoded by the entropy decoding module 210, that is, thequantized transform coefficients, based on a rearrangement method usedin the encoding apparatus.

The rearrangement module 215 may reconstruct and rearrange a 1D vectorof coefficients into a 2D block of coefficients. The rearrangementmodule 215 may scan coefficients based on a prediction mode of a currentblock (transform block) and a size of the transform block to generate a2D block of coefficients (quantized transform coefficients).

The dequantization module 220 may perform dequantization based on aquantization parameter provided from the encoding apparatus and therearranged coefficients of the block.

The inverse transform module 225 may perform inverse DCT and/or inverseDST on a result of quantization performed by the video encodingapparatus in response to DCT and DST performed by the transform moduleof the encoding apparatus.

Inverse transformation may be performed on the basis of a transfer unitor a partition unit of a picture determined by the video encodingapparatus. The transform module of the video encoding apparatus mayselectively perform DCT and/or DST depending on a plurality ofinformation elements, such as a prediction method, a size of the currentblock and a prediction direction, and the inverse transform module 225of the video decoding apparatus may perform inverse transformation onthe basis of information on the transformation performed by thetransform module of the video encoding apparatus.

The prediction module 230 may generate a prediction block based oninformation on generation of the prediction block provided from theentropy decoding module 210 and information on a previously decodedblock and/or picture provided by the memory 240.

When a prediction mode for a current PU is an intra prediction mode,intra prediction may be performed based on information on a pixel in acurrent picture to generate the prediction block.

When a prediction mode for the current PU is an inter prediction mode,inter prediction for the current PU may be performed based oninformation on at least one of previous and subsequent pictures of thecurrent picture. Here, motion information necessary for the interprediction for the current PU provided by the video encoding apparatus,for example, information on a motion vector and a reference pictureindex, may be derived by checking a skip flag and a merge flag receivedfrom the encoding apparatus.

A reconstructed block may be generated using the prediction blockgenerated by the prediction module 230 and the residual block providedby the inverse transform module 225. FIG. 2 illustrates that thereconstructed block is generated by the adder merging the predictionblock with the residual block. Here, the adder may be regarded as aseparate module for generating the reconstructed block (reconstructedblock generation module).

When the skip mode is used, the prediction block may be thereconstructed block without transmitting the residual block.

The reconstructed block and/or picture may be provided to the filtermodule 235. The filter module 235 may apply deblocking filtering, SAOand/or AFL to the reconstructed block and/or picture.

The memory 240 may store the reconstructed picture or block to be usedas a reference picture or a reference block and supply the reconstructedpicture to an output unit.

Components directly related to video decoding among the entropy decodingmodule 210, the rearrangement module 215, the dequantization module 220,the inverse transform module 225, the prediction module 230, the filter235 and the memory 240 of the decoding apparatus 200, for example, theentropy decoding module 210, the rearrangement module 215, thedequantization module 220, the inverse transform module 225, theprediction module 230 and the filter 235 may be defined as a decoder ora decoding unit, separately from the other components.

Further, the decoding apparatus 200 may further include a parsing module(not shown) to parse information about an encoded video included in thebitstream. The parsing module may include the entropy decoding module210 or be included in the entropy decoding module 210. The parsingmodule may be provided as one component of the decoding unit.

FIG. 3 illustrates a form of a PU included in a CU according to thepresent invention.

Video prediction for coding may be performed for a CU which is notfurther partitioned, that is, a leaf node of a CU tree. A current CU isdivided into one or more PUs, prediction blocks or partitions, and thisprocess is also referred to as partition. A PU is a basic unit forprediction, and different forms of PUs may be used for an intra CU andan inter CU.

(a) shows PUs for a CU for intra prediction. A 2N×2N CU for intraprediction may include a 2N×2N PU having the same size as the CU or bepartitioned into N×N PUs, wherein N is an integer.

(b) shows PUs for a CU for inter prediction. A 2N×2N CU for interprediction may include a 2N×2N PU having the same size as the CU or bepartitioned into 2N×N PUs, N×2N PUs, N×N PUs, an nL×2N PU, an nR×2N PU,a 2N×nU PU and a 2N×nD PU.

Among the PUs for inter prediction, the nL×2N PU, nR×2N PU, 2N×nU PU and2N×nD PU are obtained by asymmetrically partitioning the CU, and suchpartitioning may restrict prediction directions in inter predictiondepending specific restrains.

A picture to be applied to inter prediction may include a P-picture anda B-picture. A P-picture may be a picture to be applied tounidirectional prediction using a single reference picture, and aB-picture may be a picture to be applied to forward, backward orbidirectional prediction using more than one reference pictures, forexample, two reference pictures. For instance, a B-picture may beapplied to inter prediction using one forward reference picture(previous picture) and one backward reference picture (subsequentpicture). Also, two forward reference pictures or two backward referencepictures may be used to predict a B-picture.

Here, reference pictures may be managed on a reference picture list. AP-picture may use a single reference picture, which may be allocated toa reference picture list 0 (L0 or List0). A B-picture may use tworeference pictures, which may be allocated to a reference picture list 0and a reference picture list 1 (L1 or List1), respectively. Hereinafter,an L0 reference picture list may refer to a reference picture list 0,and an L1 reference picture list may refer to a reference picture list1.

Generally, a forward reference picture may be allocated to a referencepicture list 0, and a backward reference picture may be allocated to areference picture list 1. Alternatively, without being limited to theforegoing example, a forward reference picture may be allocated to areference picture list 1 and a backward reference picture may beallocated to a reference picture list 0. Hereinafter, a referencepicture allocated to a reference picture list 0 is defined as an L0reference picture, and a reference picture allocated to a referencepicture list 1 as an L1 reference picture.

Reference pictures may be generally allocated to reference picture listsin descending order according to reference picture numbers. Here, thereference picture numbers may refer to numbers allocated to thereference pictures in picture order count (POC) order, and the POC ordermay be display order and/or chronological order of the pictures. Forexample, two reference pictures having the same reference picture numbermay be the same. The reference pictures allocated to the referencepicture lists may be reordered by a reference picture list reordering(RPLR) or memory management control operation (MMCO) command.

As described above, a P-picture may be subjected to unidirectionalprediction using a single L0 reference picture, and a B-picture may besubjected to forward, backward or bidirectional prediction using one L0reference picture and one L1 reference picture, that is, two referencepictures. Prediction using a single reference picture may be referred toas uni-prediction, and prediction using two reference pictures includingan L0 reference picture and an L1 reference picture may be referred toas bi-prediction.

While bi-prediction may be used to collectively refer to forwardprediction, backward prediction and bidirectional prediction, in thefollowing embodiments, prediction using two reference pictures, L0 andL1 reference pictures, is defined as bidirectional prediction forconvenience. That is, it should be noted that bidirectional predictionmay refer to bi-prediction and be construed as including forwardprediction, backward prediction and bidirectional perdition using tworeference pictures including L0 and L1 reference pictures. Further,while forward prediction or backward prediction may be also performedwhen bi-prediction is performed, in the following embodiment, predictionusing only one reference picture is defined as unidirectional predictionfor convenience. That is, it may be noted that unidirectional predictionmay denote uni-prediction and include prediction using a singlereference picture only. Information indicating which of unidirectionalprediction (uni-prediction) or bidirectional prediction (bi-prediction)is applied to a block to be predicted is referred to as predictiondirection information.

The prediction direction information is encoded by the entropy encodingmodule 130 of the encoding apparatus and decoded by the entropy decodingmodule 210 of the decoding apparatus, thereby being used for interprediction.

Meanwhile, as described in FIG. 1, video information including theprediction direction information may be entropy-encoded and transmittedin a bitstream to the decoding apparatus. The decoding apparatusentropy-decodes the received bitstream to obtain the video informationincluding predicted information, as described in FIG. 2.

FIG. 4 schematically illustrates an entropy coding module according tothe present invention. A configuration of the entropy coding moduleillustrated in FIG. 4 may be applied to both entropy encoding andentropy decoding.

Considering FIG. 4 as an entropy encoding module, the entropy encodingmodule 400 may include a binarization module 410, a regular codingengine 420 and a bypass coding engine 430.

Here, entropy encoding processes a signal input in a D1 direction andoutputs the processed signal in a D2 direction.

When the input signal is a syntax element, not a binary value, thebinarization module 410 transforms the input signal into a binarynumber. When the input signal is a binary value, the input signal maybypass the binarization module 410.

Each digit of an input binary value is referred to as a bin. Forexample, when an input binary value is 110, each of 1, 1 and 0 is a bin.A binary sequence of bins is referred to as a bin string.

The binarization module 410 may binarize the prediction directioninformation as illustrated in Table 1.

TABLE 1 P-slice B-slice L0 0 00 L1 1 01 BI x 1

Referring to Table 1, for a P-slice to be applied to unidirectionalprediction, the binarization module 410 may binarize the predictiondirection information to “0” when forward prediction is performed, andto “1” when backward prediction is performed.

For a B-slice to be applied to bidirectional prediction, thebinarization module 410 may binarize the prediction directioninformation to “00” when forward prediction is performed, to “01” whenbackward prediction is performed, and to “1” when bidirectionalprediction is performed.

Alternatively, the binarization module 410 may binarize the predictiondirection information as illustrated in Table 2.

TABLE 2 P-slice B-slice L0 0 00 L1 1 01 BI x 10

Referring to Table 2, for a P-slice to be subjected to unidirectionalprediction, the binarization module 410 may binarize the predictiondirection information to “0” when forward prediction is performed, andto “1” when backward prediction is performed.

For a B-slice to be subjected to bidirectional prediction, thebinarization module 410 may binarize the prediction directioninformation to “00” when forward prediction is performed, to “01” whenbackward prediction is performed, and to a 2-bit “10” when bidirectionalprediction is performed, similarly to another case of the B-slice.

Binarization in Table 2, simplified as compared with binary values ofTable 1, may facilitate realization of hardware functioning to encodeand decode video information.

In Tables 1 and 2, when a prediction direction of a PU to be applied tointer prediction is not restricted, the binarization module 410allocates the binary values according to the prediction directioninformation.

Meanwhile, a prediction direction may be limited depending on a CU sizeor PU size. For instance, a PU with a particular size may haverestriction in applying bidirectional prediction in order to reducecomplexity or enhance coding efficiency. In this case, using the samebinary values as listed in Tables 1 and 2 for bidirectional predictionmay cause redundancy of bins and waste of transmitted information.

Thus, in the exemplary embodiment, the binarization module 410 maybinarize index values of forward prediction, backward prediction andbidirectional prediction in different manners based on whetherbidirectional prediction is applied to the current block in interprediction. Here, the current block may be a CU or PU.

For instance, when bidirectional prediction is applied to the currentblock in inter prediction, the binarization module 410 may allocate2-bit codewords to index values of forward prediction and backwardprediction and allocate a 1-bit codeword to an index value ofbidirectional prediction.

However, when bidirectional prediction is not applied to the currentblock in inter prediction, the binarization module 410 may allocate1-bit codewords to the index values of forward prediction and backwardprediction.

Here, whether bidirectional prediction is applied may be determinedbased on a size of the current block.

Table 3 illustrates codewords the binarization module 410 allocates toprediction direction indexes.

TABLE 3 B slice P slice 8 × 8CU && !SIZE_2N × 2N Otherwise L0 0 0 00 L11 1 01 BI x x 1

Referring to Table 3, for a P-slice, the same 1-bit codewords as inTables 1 and 2 are allocated to the prediction direction indexes.

However, for a B-slice, different binary values are allocated to theprediction direction indexes depending on whether bidirectionalprediction is applied. When the current block has a particular size(8×8CU && !SIZE_2N×2N), that is, bidirectional prediction is notapplied, the binarization module 410 allocates a codeword “0” to aforward prediction index and a codeword “1” to a backward predictionindex, the same as for the P-slice.

However, when bidirectional prediction is applied to the current block,the binarization module 410 allocates a 2-bit codeword “00” to theforward prediction index and a 2-bit codeword “01” to the backwardprediction index. The binarization module 410 allocates a 1-bit codeword“1” to a bidirectional prediction index.

In the present embodiment, when a CU including the current block has a8×8 size and the current block has a 2N×2N partition mode, bidirectionalprediction is not used in inter prediction.

FIG. 5 illustrates partitioning an 8×8 CU. As shown in FIG. 5, the 8×8CU may have four partitioning styles and accordingly be partitioned in a8×8 PU, 8×4 PUs, 4×8 PUs, and 4×4 PUs.

Referring to Table 3, when the CU including a current block is 8×8 and apartition mode is not 8×8, that is, a PU has a smaller size, such as8×4, 4×8 or 4×4, bidirectional prediction is not applied. Thus, thebinarization module 410 allocates the same 1-bit codewords as for theP-slice to the forward prediction index and the backward predictionindex for 8×4, 4×8 and 4×4 PUs.

Bidirectional prediction is applied to the 8×8 PU as for a generalB-slice, and the binarization module 410 binarizes prediction directioninformation on the current block in the same manner as for the B-slicein Table 1. Here, the binarization module 410 may also allocate acodeword to the prediction direction information in the samebinarization as in Table 2.

Alternatively, the binarization module 140 may apply the samebinarization as in Table 3 to a PU of which a sum of width and length is12. That is, when the current block has a 8×4 or 8×4 size among the PUsof FIG. 4, bidirectional prediction may not be applied, and accordinglythe binarization module 410 may binarize prediction directioninformation on the PU with a 8×4 or 8×4 size in a different manner fromfor a PU with a different size.

Alternatively, when a partition mode of the current block is nL×2N,nR×2N, 2N×nU and 2N×nD as shown in FIG. 3(b), bidirectional predictionmay not be applied.

For example, when a CU including a current slice has a 16×16 size and ispartitioned into a nL×2N, nR×2N, 2N×nU or 2N×nD PU, the binarizationmodule 410 may allocate codewords to prediction direction indexes as inTable 4.

TABLE 4 B slice P slice 16 × 16CU && ASMP Otherwise L0 0 0 00 L1 1 1 01BI x x 1

In Table 4, an asymmetry motion partition (ASMP) refers to a PUpartitioned asymmetrically.

Alternatively, bidirectional prediction may not be applied to onlyeither of asymmetrically partitioned PUs. For example, bidirectionalprediction may not be applied to only a smaller PU of the asymmetricallypartitioned PUs.

FIG. 6 illustrates partitioning a 16×16 CU. As shown in FIG. 6, the16×16 CU may have eight partitioning, that is, be partitioned into 16×16PU, 16×8 PU, 8×16 PU, 8×8 PU, 12×16 PU, 4×16 PU, 16×4 PU and 16×12 PU.

Among asymmetrically partitioned PUs shown at the bottom of FIG. 6,bidirectional prediction may not be applied to smaller PUs, that is,4×16 PU and 16×4 PU, in which case the binarization module 410 maybinarize prediction direction information on the 4×16 PU and 16×4 PU ina different manner from for a PU with a different size. Table 5illustrates a codeword allocated to prediction direction information.

TABLE 5 B slice 16 × 16 CU && (((PU = 2N × nU|nL × 2N) && PU id = 0) ∥ Pslice ((PU = 2N × nD∥nR × 2N) && PU id = 1)) Otherwise L0 0 0 00 L1 1 101 BI x x 1

In Table 5, a PU id refers to an index of two partitioned PUs, whereinan index of 0 indicates a smaller PU among 2N×nU and nL×2N PUs and anindex of 1 indicates a smaller PU among 2N×nD and nR×2N PUs. That is,these indexes indicate the PUs marked with slashes in FIG. 6 andbidirectional prediction may not be applied to the smaller PUs.

The binarized signal (bin string) is input to the regular coding engine420 and the bypass coding engine 430.

The regular coding engine 420 allocates a context reflecting aprobability value to a bin and encodes the bin based on the allocatedcontext. The regular coding engine 420 may encode each bin and thenupdate a context about the bin.

The bypass coding engine 430 encodes only a bin input in bypass modewithout allocating a context depending on an input bin to enhance anencoding speed. In the bypass mode, processes of estimating aprobability for an input bin and updating a probability applied to a binafter encoding are defined as bypassing. In the bypass mode, forexample, uniform probability distribution is applied to an encodingprocess.

The entropy encoding module 400 determines whether to use the regularcoding engine 420 or to use the bypass coding engine 430 to conductentropy encoding and may switch an encoding route through 1 switchingmodule 440.

Bins in Tables 1 to 5 may be input to the regular coding engine 420 forcontext coding for coding efficiency or input to the bypass codingengine 430 for convenient realization of hardware.

Alternatively, a first bin indicating bidirectional prediction may besubjected to context coding, while bins indicating forward predictionand backward prediction may be subjected to bypass coding. In this case,possibilities of forward prediction and backward prediction areconsidered nearly similar.

When context coding is used, a context of each bin may be changed on adepth of a current CU or have a fixed value.

The entropy encoding module 400 may be the entropy encoding module 130of FIG. 1.

Considering FIG. 4 as an entropy decoding module, the entropy decodingmodule 400 may include a binarization module 410, a regular codingengine 420 and a bypass coding engine 430.

The entropy decoding module 400 processes a signal input in a D3direction and outputs the processed signal in a D4 direction.

The binarization module 410, the regular coding engine 420 and thebypass coding engine 430 perform the same processes as those in theentropy encoding module in inverse order.

For example, the entropy decoding module 400 determines whether to usethe regular coding engine 420 or to use the bypass coding engine 430 indecoding a bin of an input syntax element.

When the regular coding engine 420 is selected, the regular codingengine 420 performs decoding using a context. When the bypass codingengine 430 is selected, the bypass coding engine 430 performs decodingusing uniform probability distribution. Binary codes are output fromdecoding by the coding engines 420 and 430.

When decoding all bins of a particular syntax (syntax element) isfinished in the coding engines, binary codes output with respect to allbins of the syntax are added and the added code is determined whichsyntax value is mapped onto. When the output final binary code is mappedonto a particular syntax, a value the binary code is determined to be avalue of the mapped syntax.

Here, the binarization module 410 may perform inverse binarization asnecessary.

The binarization module 410 may decode binary codes in different mannersbase on Tables 1 to 5 depending on whether bidirectional prediction isperformed for a current block in inter prediction.

Meanwhile, the decoding apparatus entropy-decodes a bitstream receivedfrom the encoding apparatus. Hereinafter, or convenience of description,when the encoding apparatus entropy-encodes video information, forexample, using CABAC, an entropy decoding method adopted by the decodingapparatus is described.

For instance, when parsing a syntax element coded by CABAC, the decodingapparatus, specifically the entropy decoding module, starts a CABACparsing process upon request for a value of the syntax element.

In detail, when the value of the syntax element is requested,binarization of the value of the syntax element is induced. Binarizationis performed according to a binarization type, for example, unarybinarization, truncated unary binarization, Exp-Golomb binarization andfixed length binarization.

A decoding process is determined on binarization of a syntax element anda sequence of parsed bins. Each bin of binarized values with respect tosyntax elements is indexed using a bin index binIdx and a context indexctxIdx is derived for each bin. An initial value of a context index byeach syntax element may be set. In this case, a context index tableincluding context index values set for syntax elements may be used,which may be specified by an indicator, for example, a context indextable indicator ctxIdxTable.

Arithmetic decoding is started for each context index.

FIG. 7 is a flowchart illustrating a method of coding video informationaccording to an exemplary embodiment of the present invention. Forconvenience of description, a method of coding prediction directioninformation in inter prediction as video information is illustrated, andthe prediction direction information may be applied to a decodingprocess by performing the following process in inverse order. Entropydecoding and inverse binarization of the video information may berealized by various known methods.

Referring to FIG. 7, the entropy encoding module may binarize indexvalues of forward prediction, backward prediction and bidirectionalprediction in different manners depending on whether bidirectionalprediction is applied to a current block in inter prediction (S710).

It may be determined based on a size of the current block whetherbidirectional prediction is applied to the current block in interprediction. For example, application of bidirectional prediction to thecurrent block in inter prediction may be determined based on whether aCU including the current block has an 8×8 size and a partition mode ofthe current block is 2N×2N.

When the CU including the current block has an 8×8 size and thepartition mode of the current block is not 2N×2N, the entropy encodingmodule determines that bidirectional prediction is not applied to thecurrent block and allocates 1-bit codewords to index values of forwardprediction and backward prediction (S720).

When the CU including the current block is not a block which has an 8×8size and the partition mode of the current block is not 2N×2N, theentropy encoding modules determines that bidirectional prediction isapplied to the current block in inter prediction, and allocates 2-bitcodewords to the index values of forward prediction and backwardprediction and 1-bit codewords to an index value of bidirectionalprediction (S730).

The size of the current block which has a restriction that bidirectionalprediction is not applied to the current block in inter prediction maybe set variously. For example, when the current block has a sum of widthand length of 12, bidirectional prediction may not be applied to thecurrent block. When the current block has a 16×16 size and is PUasymmetrically partitioned or a smaller PU among the PU asymmetricallypartitioned, bidirectional prediction may not be applied to the currentblock. Prediction direction information may be binarized based on Tables3 to 5 depending on whether bidirectional prediction is applied.

A codeword of the binarized prediction direction information may beentropy-encoded by bypass coding or context coding (S740).

Although methods of illustrative systems have been described with aseries of stages or blocks based on the flowcharts, the presentinvention is not limited to the foregoing sequence of the stages. Somestages may be carried out in different order from described above or atthe same time. Further, it should be noted that as the aforementionedembodiments may include various aspects of examples, combinations of theembodiments may be also understood as exemplary embodiments of thepresent invention. Thus, it will be appreciated by those skilled in theart that changes, modifications and alternatives may be made in theseexemplary embodiments without departing from the principles and spiritof be the invention, the scope of which is defined in the appendedclaims and their equivalents.

1. A video encoding method, comprising: determining, by an encodingapparatus, a prediction mode for a current prediction unit; determining,by an encoding apparatus, an inter prediction type for whether list0prediction, list1 prediction, or bi-prediction is applied for thecurrent prediction unit in which the prediction mode is an interprediction mode; generating, by the encoding apparatus, information onthe prediction mode and information on the inter prediction type; andencoding, by the encoding apparatus, video information including theinformation on the prediction mode and the information on the interprediction type, wherein whether the bi-prediction is not available forthe current prediction unit is determined based on a size of the currentprediction unit, wherein the current prediction unit is derived from acurrent coding unit based on a partition mode, wherein based on the casewhere the current coding unit has an 8×8 size and the partition mode is2N×N or N×2N, the bi-prediction is not available for the currentprediction unit.
 2. The method of claim 1, wherein based on the casewhere the current coding unit has the 8×8 size and the partition mode is2N×2N, the bi-prediction is available for the current prediction unit.3. The method of claim 1, wherein based on the case where the currentprediction unit has a sum of width and length of 12, the bi-predictionis not available for the current prediction unit.
 4. The method of claim1, wherein based on the case where the bi-prediction is available forthe current prediction unit, a bin string for the list0 prediction orthe list1 prediction consists of 2 bins, and wherein based on the casewhere the bi-prediction is not available for the current predictionunit, the bin string for the list0 prediction or the list1 predictionconsists of 1 bin.
 5. The method of claim 4, wherein based on the casewhere the bi-prediction is available for the current prediction unit,the bin string for the bi-prediction consists of 1 bin.
 6. The method ofclaim 1, wherein the list0 prediction is based on a reference picturelist0, and the list1 prediction is based on a reference picture list1,and the bi-prediction is based on both the reference picture list0 andthe reference picture list1.
 7. A non-transitory decoder-readablestorage medium storing encoded video information generated by anencoding process comprising: determining, by an encoding apparatus, aprediction mode for a current prediction unit; determining, by anencoding apparatus, an inter prediction type for whether list0prediction, list1 prediction, or bi-prediction is applied for thecurrent prediction unit in which the prediction mode is an interprediction mode; generating, by the encoding apparatus, information onthe prediction mode and information on the inter prediction type; andencoding, by the encoding apparatus, video information including theinformation on the prediction mode and the information on the interprediction type, wherein whether the bi-prediction is not available forthe current prediction unit is determined based on a size of the currentprediction unit, wherein the current prediction unit is derived from acurrent coding unit based on a partition mode, wherein based on the casewhere the current coding unit has an 8×8 size and the partition mode is2N×N or N×2N, the bi-prediction is not available for the currentprediction unit.
 8. The non-transitory decoder-readable storage mediumof claim 7, wherein based on the case where the current coding unit hasthe 8×8 size and the partition mode is 2N×2N, the bi-prediction isavailable for the current prediction unit.
 9. The non-transitorydecoder-readable storage medium of claim 7, wherein based on the casewhere the current prediction unit has a sum of width and length of 12,the bi-prediction is not available for the current prediction unit. 10.The non-transitory decoder-readable storage medium of claim 7, whereinbased on the case where the bi-prediction is available for the currentprediction unit, a bin string for the list0 prediction or the list1prediction consists of 2 bins, and wherein based on the case where thebi-prediction is not available for the current prediction unit, the binstring for the list0 prediction or the list1 prediction consists of 1bin.
 11. The non-transitory decoder-readable storage medium of claim 10,wherein based on the case where the bi-prediction is available for thecurrent prediction unit, the bin string for the bi-prediction consistsof 1 bin.
 12. The non-transitory decoder-readable storage medium ofclaim 7, wherein the list0 prediction is based on a reference picturelist0, and the list1 prediction is based on a reference picture list1,and the bi-prediction is based on both the reference picture list0 andthe reference picture list1.